# 加入购物车
from selenium.webdriver.common.by import By


class PageEcshopFrontAddCat():
    def __init__(self, driver):
        self.driver = driver
        # 元素定位
        self.loc_front_click_add_cat = (By.XPATH, '//form[@id="ECS_FORMBUY"]/ul[3]/li[2]/a/img')

    # 点击立即购买
    def front_click_add_cat(self):
        self.driver.find_element(*self.loc_front_click_add_cat).click()
